// Compiler: MSVC 19.29.30038.1
// C++ Standard: C++17
#include <iostream>
#include <thread>
// #include <mutex>
#include <atomic>

std::atomic<int> n = 0;
void count10000() {
	for (int i = 1; i <= 10000; i++) {
		n++;
        // n.store(i);
	}
}
int main() {
	std::thread th[100];
	for (std::thread &x : th)
		x = std::thread(count10000);
	for (std::thread &x : th)
		x.join();
	std::cout << n << std::endl;
	return 0;
}
